package com.enjoyor.health.HGPT.core.service.impl;

import com.enjoyor.health.HGPT.core.entity.PhysicalExaminationPackage;
import com.enjoyor.health.HGPT.core.mapper.PhysicalExaminationPackageMapper;
import com.enjoyor.health.HGPT.core.service.IPhysicalExaminationPackageService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.google.common.collect.Maps;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author enjoyor
 * @since 2023-10-18
 */
@Service
public class PhysicalExaminationPackageServiceImpl extends ServiceImpl<PhysicalExaminationPackageMapper, PhysicalExaminationPackage> implements IPhysicalExaminationPackageService {

    @Override
    public List<PhysicalExaminationPackage> getPhysicalExaminationPackageIdByOpenId(String packageTypeName, String openId) {
        HashMap<String, Object> map = Maps.newHashMap();
        map.put("package_type_name", packageTypeName);
        map.put("open_id", openId);
        return baseMapper.getPhysicalExaminationPackageIdByOpenId(map);
    }

    @Override
    public List<PhysicalExaminationPackage> getByPackageType(Integer packageType) {
        HashMap<String, Object> map = Maps.newHashMap();
        map.put("package_type", packageType);
        return baseMapper.getByPackageType(map);
    }
}
